#include <iostream>
#include <boost/asio.hpp>
#include <boost/date_time/posix_time/posix_time.hpp>

using namespace std;
using namespace boost;
using namespace boost::asio;

void print(const system::error_code &) 
{
    cout << "Hello asio" << endl;
}

int main() 
{
    io_service ios;
    deadline_timer t(ios, posix_time::seconds(2));
    t.async_wait(print);
    cout << "it show before t expired." << endl;
    //ios.run();
    sleep(5);
    return 0;
}
